<!-- 考试科目 -->
<template>
	<view class="hotSubject">
		<view class="contents">
			<image class="top-bg" src="https://aihelp.oss-cn-hangzhou.aliyuncs.com/public/base/2023/10/16/c5d383fcd8d444498e91ded472361dd9.png" mode="aspectFill"></image>
		<view class="tableBox">
			<view v-for="(item,index) in list" :key="index" class="flex align-center items">
				<view class="rank shrink-0">{{index+1}}</view>
				<view class="u-m-l-25 u-flex-1">
					<view class="flex align-center justify-between">
						<view class="flex align-center">
							<view class="u-font-28">{{item.majorName}}</view>
						</view>
						<view class="flex align-center bold" style="color: #FF7101;">
							<u-icon class="u-m-r-5"
								name="https://aihelp.oss-cn-hangzhou.aliyuncs.com/public/base/2023/12/15/3f226e3136c84b8bb0d87f042e266984.png"
								size="26"></u-icon>
							{{item.hot}}
						</view>
					</view>
					<view class="flex align-center justify-between u-m-t-25">
						<view class="flex align-center">
							<u-icon class="u-m-r-5"
								name="https://aihelp.oss-cn-hangzhou.aliyuncs.com/public/base/2023/12/15/3472d2fd6d954d0eba53ee864e2b963c.png"
								size="24"></u-icon>
							<text class="u-font-20 color999">开设大学数</text>
							<text class="u-font-24 u-m-l-5">{{item.schoolNum}}</text>
						</view>
						<!-- <view class="flex align-center justify-center btn u-font-24" @click="openPages(item)">
							<u-icon
								name='https://aihelp.oss-cn-hangzhou.aliyuncs.com/public/base/2023/11/11/fcec3e172ffc43838ba60ae8fa67cba6.png'
								size="28" class="u-m-r-5"></u-icon>
							报录比总括
						</view> -->
					</view>
				</view>
			</view>
		</view>
		<view style="height: 40rpx;" class="iosPaddingBottom"></view>
		</view>		
	</view>
</template>

<script>
	import { hotMajor} from '@/api/toolbox.js';
	export default {
		data() {
			return {
				list: [],
				searchParam: {
					type: 'exam'
				},
			}
		},
		methods: {
			openPages(row){
				uni.navigateTo({
					url: `/pages/toolbox/chooseMajor/hotList/components/reporting/reporting?id=${row.id}`,
				});
			},
			getData(){
				uni.showLoading({
					title: '加载中...',
					mask: true
				});
				hotMajor(this.searchParam).then(res=>{
					console.log('hotSubject: ',res);
					if(res.code === 100000){
							this.list = res.data.hotMajor;
					}
				}).finally(() => {
					uni.hideLoading();
				})
			},		
		}
	}
</script>

<style lang="scss" scoped>
	.top-bg {
		width: 100%;
		height: 254rpx;
		border-radius: 100rpx;
		border-top-left-radius: 0px;
		border-top-right-radius: 0px;
	}
	
	.tableBox {
		margin: 0 20rpx;
	
		.items {
			border-radius: 30rpx;
			border: 2rpx solid #F2F2F2;
			box-shadow: 10rpx 10rpx 10rpx rgba(215, 215, 215, .35);
			padding: 30rpx 25rpx;
			margin-bottom: 20rpx;	
			.btn{
				background-color: #F9F9F9;
				border-radius: 100rpx;
				padding: 15rpx 25rpx;
			}
		}
	
		.rank {
			width: 50rpx;
			height: 50rpx;
			border: 6rpx solid #F2F2F2;
			border-radius: 100rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 26rpx;
		}
	}
</style>